﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Core.DBUtility;
using AutoMapper;
using Microhard.Plat.CRM.Customers.Models;
using Microhard.Plat.CRM.Customers.DataAccess;

namespace Microhard.Plat.CRM.Customers.DTO
{
    public class CustomerServerMapBuilder : IDTOBuilder
    {
        public void MappingBuild()
        {

            #region SaleLead
            Mapper.CreateMap<SaleLeadModel, SaleLead>();
            Mapper.CreateMap<SaleLead, SaleLeadModel>();
            #endregion

            #region Customer
            Mapper.CreateMap<CustomerModel, Customer>();
            Mapper.CreateMap<Customer, CustomerModel>();
            #endregion

            #region Product
            Mapper.CreateMap<ProductModel, Product>();
            Mapper.CreateMap<Product, ProductModel>();
            #endregion

            #region Order
            Mapper.CreateMap<OrderModel, Order>();
            Mapper.CreateMap<Order, OrderModel>();
            #endregion

            #region OrderDetail
            Mapper.CreateMap<OrderDetailModelInServer, OrderDetail>();
            Mapper.CreateMap<OrderDetail, OrderDetailModelInServer>();
            #endregion

            #region CustomerCoin
            Mapper.CreateMap<CustomerCoinModel, CustomerCoin>();
            Mapper.CreateMap<CustomerCoin, CustomerCoinModel>();
            #endregion

            #region CoinCusumeOrder
            Mapper.CreateMap<CoinCusumeOrderModel, CustomerCoinOrder>();
            Mapper.CreateMap<CustomerCoinOrder, CoinCusumeOrderModel>();
            #endregion
        }
    }
}
